window.onload = function () {
//do the persist

	var lis = document.getElementById('navs').getElementsByTagName('li');
	var hrefs = document.getElementById('navs').getElementsByTagName('a');
	var pg = window.location.href;
	
	for (i=0;i<lis.length;i++) {		
	 	if(lis[i].className=='sub selected') lis[i].className='sub'; 
	}
	for (i=0;i<hrefs.length;i++) {
		if(hrefs[i].className=='selected') hrefs[i].className='';
		var pgAt = hrefs[i].href;
		//var pgAt2 = pgAt.lastIndexOf('/',pgAt.length);
		//pgAt = pgAt.substring(pgAt2,pgAt.length); 
		if(pg.indexOf(pgAt)>-1 && hrefs[i].parentNode.className!='sub') {
		//alert(pgAt)
			hrefs[i].parentNode.parentNode.parentNode.parentNode.className = 'sub selected';
			hrefs[i].parentNode.parentNode.parentNode.parentNode.firstChild.nextSibling.className = 'selected';
		}
	}
	
// end onload.	


}